package com.topcoder.srm513;

public class TrainingCamp {
	public String[] determineSolvers(String[] attendance, String[] problemTopics) {
		int N = attendance.length;
		int M = attendance[0].length();
		int K = problemTopics.length;
		String[] s = new String[N];
		
		for (int n=0; n<N; n++) {
			s[n] = "";
			for (int k=0; k<K; k++) {
				char c = 'X';
				for (int m=0; m<M; m++) {
					if (problemTopics[k].charAt(m)=='X' && attendance[n].charAt(m)=='-') {
						c = '-';
						break;
					}
				}
				s[n] += c;
			}
		}
		
		return s;
	}
}
